package IC.AST.nodes;

import java.util.List;
import IC.AST.*;

/**
 * a class declaration
 */
public class ClassDecl extends ASTNode {
	private String classID;	// the class name
	private String baseClassID;	// the base class
	private List<ASTNode> classMembers;	// list of class members

	/**
	 * @param classID the class name
	 * @param baseClassID the base class
	 * @param classMembers list of class members
	 * @param line the node line number
	 * @param column the node column number
	 */
	public ClassDecl(String classID, String baseClassID, List<ASTNode> classMembers, int line, int column) {
		super(line,column);
		this.classID = classID;
		this.baseClassID = baseClassID;
		this.classMembers = classMembers;
	}

	/**
	 * @return the class name
	 */
	public String getClassID() {
		return this.classID;
	}

	/**
	 * @return the base class
	 */
	public String getBaseClassID() {
		return this.baseClassID;
	}

	/**
	 * @return list of class members
	 */
	public List<ASTNode> getClassMembers() {
		return this.classMembers;
	}

	public Object accept(Visitor v) {
		return v.visit(this);
	}
}
